import instance from '../utils/axios'
import instance3 from '../utils/axios3'

export const userLogin = ({ username, password = '' }) => {
  return instance.post('/user/login', { username, password })
}

export const ttapi = () => {
  console.log(123)
  return instance3.get('api/ttapi/mp/')
}
// 获取Tok
export const getTok = () => {
  // 这个可以放在store里面
  const baiduApi = {
    grant_type: 'client_credentials',
    client_id: '9jv7kCsxjsTRhCRhRGddMaoi',
    client_secret: 'yhRR8SQrRXF2E0WHMpzZrrNmqTF7k8UZ'
  }
  return instance3.get('api/baidu/oauth/2.0/token', { params: { ...baiduApi } })
}
